﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IBS.Model;

namespace IBS.ServiceContracts
{
    public interface ICardService
    {
        #region Maintenance

        Card CreateNewCard(Client client, CardType cardType, string login, decimal startAmount = 0);
        void DeleteCard(string cardNumber);
        
        Card CreateAdditionalCard(string existingCardNumber, string login);

        IList<Card> GetClientsCard(Client client, Func<Card, bool> criteria = null, int? page = null);
        IList<Card> GetCards(Func<Card, bool> criteria = null, int? page = null);
        Card GetCardByNumber(string cardNumber);
        void LockCard(string cardNumber);
        void UnlockCard(string cardNumber);

        #endregion

        #region Transfer

        Transfer TransferToCard(string fromCardNumber, string toCardNumber, decimal amount, string ISO, string userName);
        Transfer TransferToAccount(string fromCardNumber, string toAccountNumber, decimal amount, string ISO, string userName);
        Transfer Deposit(string cardNumber, decimal amount);
        Transfer Withdraw(string cardNumber, decimal amount);

        #endregion
    }

}
